<?php
/**
 * Created by PhpStorm.
 * User: chenxuyi
 * Date: 2017/12/20
 * Time: 下午4:33
 */

namespace App\Exceptions;

final class ErrorCode
{

    const SUCCESS              = 0; //请求成功
    const SYSTEM_ERROR         = 1; //系统错误
    const PARAM_ERROR          = 2; //参数错误
    const DB_ERROR             = 3; //数据库操作错误
    const REQUEST_ERROR        = 4; //请求错误
    const REQUEST_METHOD_ERROR = 5; //请求方式错误

    /**
     * 错误信息
     */
    const ERROR_MSG = [
        self::SYSTEM_ERROR         => 'system error',
        self::REQUEST_ERROR        => 'request not found',
        self::REQUEST_METHOD_ERROR => 'request method error',
    ];

}